/* Layout */
import Layout from '@/layout'

let asyncRouter = [
    
    {
        path: '/',
        component: Layout,
        redirect: '/dashboard',
        node_id: 1001,
        children: [{
            path: 'dashboard',
            name: 'Dashboard',
            node_id: 1001,
            component: () => import('@/views/dashboard/index'),
            meta: { title: '首页概览', icon: 'home' }
        }]
    },

    //产品中心
    {
        path: '/goods',
        component: Layout,
        // redirect: '/goods/kind',
        name: 'Goods',
        node_id: 1101,
        alwaysShow: true,
        meta: { title: '产品中心', icon: 'goods' },
        children: [
            {
                path: '/goods/kind',
                name: 'GoodsKind',
                // parent_id: 1101,
                node_id: 1102,
                component: () => import('@/views/goods/kind/index'),
                meta: { title: '产品管理', icon: 'kind' }
            },
            {
                path: 'product-access-mode',
                name: 'product-access-mode',
                // parent_id: 1101,
                node_id: 1102,
                hidden: true,
                component: () => import('@/views/goods/kind/product-access-mode'),
                meta: { title: '产品接入方式', icon: 'kind' ,activeMenu: '/goods/kind',}
            },
            {
                path: 'addproduct',
                name: 'addproduct',
                node_id: 1102,
                hidden: true,
                component: () => import('@/views/goods/kind/addproduct'),
                meta: { title: '新增产品', icon: 'kind', hidden: true, activeMenu: '/goods/kind',}
            },
            {
                path: 'editproduct/:editid',
                name: 'editproduct',
                node_id: 1102,
                hidden: true,
                component: () => import('@/views/goods/kind/editproduct'),
                meta: { title: '编辑产品', icon: 'kind', activeMenu: '/goods/kind',}
            },
            {
                path: 'checkproduct/:detailid',
                name: 'checkproduct',
                node_id: 1102,
                hidden: true,
                component: () => import('@/views/goods/kind/checkproduct'),
                meta: { title: '查看产品', icon: 'kind' ,activeMenu: '/goods/kind',}
            },

        ]
    },
    //营销中心
    {
        path: '/content',
        component: Layout,
        // redirect: '/content/banner',
        alwaysShow: true,
        node_id: 1201,
        name: 'Content',
        meta: { title: '营销中心', icon: 'content' },
        children: [
            {
                path: '/content/banner',
                name: 'Banner',
                // parent_id: 1201,
                node_id: 1202,
                component: () => import('@/views/content/banner/index'),
                meta: { title: 'Banner管理', icon: 'banner' }
            },
            {
                path: 'add',
                name: 'Add',
                hidden: true,
                node_id: 1202,
                component: () => import('@/views/content/banner/Add'),
                meta: { title: '新增banner', icon: 'model' ,activeMenu: '/content/banner',}
            },
            {
                path: 'edit/:editId',
                name: 'Edit',
                hidden: true,
                node_id: 1202,
                component: () => import('@/views/content/banner/Add'),
                meta: { title: '编辑Banner', icon: 'model' ,activeMenu: '/content/banner',}
            },
            {
                path: 'detail/:detailId',
                name: 'Detail',
                hidden: true,
                node_id: 1202,
                component: () => import('@/views/content/banner/Add'),
                meta: { title: 'Banner详情', icon: 'model' ,activeMenu: '/content/banner',}
            },
            {
                path: 'choose',
                name: 'Choose',
                hidden: true,
                node_id: 1202,
                component: () => import('@/views/content/banner/Choose'),
                meta: { title: '选择产品', icon: 'model' ,activeMenu: '/content/tkChoose',}
            },
            {
                path: '/content/tkChoose',
                name: 'TkChoose',
                // parent_id: 1201,
                node_id: 1203,
                component: () => import('@/views/content/tkChoose/index'),
                meta: { title: '泰康优选', icon: 'model' }
            },
            {
                path: 'editGoods/:type',
                name: 'EditGoods',
                hidden: true,
                node_id: 1203,
                component: () => import('@/views/content/tkChoose/index'),
                meta: { title: '编辑产品', icon: 'model' ,activeMenu: '/content/tkChoose',}
            },
            {
                path: 'subject',
                name: 'Subject',
                // parent_id: 1201,
                node_id: 1204,
                component: () => import('@/views/content/subject/index'),
                meta: { title: '专题管理', icon: 'topic' }
            },
            {
                path: 'addSub',
                name: 'AddSub',
                hidden: true,
                node_id: 1204,
                component: () => import('@/views/content/subject/AddSub'),
                meta: { title: '新增专题', icon: 'model' ,activeMenu: '/content/subject',}
            },
            {
                path: 'editSub/:editId',
                name: 'EditSub',
                hidden: true,
                node_id: 1204,
                component: () => import('@/views/content/subject/AddSub'),
                meta: { title: '编辑专题', icon: 'model' ,activeMenu: '/content/subject',}
            },
        ]
    },
    //订单中心
    {
        path: '/order',
        component: Layout,
        redirect: '/order/orderAll',
        name: 'Order',
        node_id: 1301,
        alwaysShow: true,
        meta: { title: '订单中心', icon: 'order' },
        children: [
            {
                path: 'orderAll',
                name: 'OrderAll',
                // parent_id: 1301,
                node_id: 1302,
                component: () => import('@/views/order/orderAll/index'),
                meta: { title: '订单管理', icon: 'order-l' }
            },

        ]
    },
    //统计中心
    {
        path: '/statistical',
        component: Layout,
        // redirect: '/statistical/statistForm',
        name: 'Statistical',
        node_id: 1401,
        alwaysShow: true,
        meta: { title: '统计中心', icon: 'statistical' },
        children: [
            {
                path: 'statistForm',
                name: 'StatistForm',
                // parent_id: 1401,
                node_id: 1402,
                component: () => import('@/views/statistical/statistForm/index'),
                meta: { title: '统计报表', icon: 'statistForm' }
            },
            {
                path: 'statistSpend',
                name: 'StatistSpend',
                // parent_id: 1401,
                node_id: 1403,
                component: () => import('@/views/statistical/statistSpend/index'),
                meta: { title: '付费情况', icon: 'statistSpend' }
            },

        ]
    },


    //系统设置
    {
        path: '/system',
        component: Layout,
        // redirect: '/system/userManner',
        name: 'System',
        node_id: 1501,
        alwaysShow: true,
        meta: { title: '系统设置', icon: 'system' },
        children: [
            {
                path: '/system/userManner',
                name: 'UserManner',
                node_id: 1502,
                component: () => import('@/views/system/userManner/index'),
                meta: { title: '用户管理', icon: 'userManner' }
            },
            {
                path: 'addUser',
                name: 'AddUser',
                hidden: true,
                node_id: 1502,
                component: () => import('@/views/system/userManner/AddUser'),
                meta: { title: '新增用户', icon: 'userManner' ,activeMenu: '/system/userManner',}
            },
            {
                path: 'editUser/:id',
                name: 'EditUser',
                hidden: true,
                node_id: 1502,
                component: () => import('@/views/system/userManner/AddUser'),
                meta: { title: '编辑用户', icon: 'userManner' ,activeMenu: '/system/userManner',}
            },
            {
                path: '/system/roleManner',
                name: 'RoleManner',
                node_id: 1503,
                component: () => import('@/views/system/roleManner/index'),
                meta: { title: '角色管理', icon: 'roleManner' }
            },
            {
                path: '/system/groupManner',
                name: 'GroupManner',
                node_id: 1504,
                component: () => import('@/views/system/groupManner/index'),
                meta: { title: '分组管理', icon: 'groupManner' }
            },
            {
                path: '/system/articleManner',
                name: 'ArticleManner',
                node_id: 1505,
                component: () => import('@/views/system/articleManner/index'),
                meta: { title: '日志管理', icon: 'articleManner' }
            },

        ]
    },
];

export default asyncRouter
